package com.springboot.studentmanagedemo.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;

/**
 * @author: zhenghongwei
 * @createDate: 2021/12/7
 * @description: 学生实体类
 */

@JsonIgnoreProperties(ignoreUnknown = true)
public class Student extends JdkSerializationRedisSerializer {

    public int studNo;
    private String studName;
    public String sex;
    public String nation;
    public String political;
    public String birthday;
    public String school;
    public String major;
    public String entranceTime;

    /*
    完整的构造方法
     */
    public Student(int studNo, String studName, String sex, String nation, String political, String birthday, String school, String major, String entranceTime) {
        this.studNo = studNo;
        this.studName = studName;
        this.sex = sex;
        this.nation = nation;
        this.political = political;
        this.birthday = birthday;
        this.school = school;
        this.major = major;
        this.entranceTime = entranceTime;
    }

    /*
    用于前端添加接口的构造方法
    不包含studNo,数据库自动生成
     */
    public Student(String studName, String sex, String nation, String political, String birthday, String school, String major, String entranceTime) {
        this.studName = studName;
        this.sex = sex;
        this.nation = nation;
        this.political = political;
        this.birthday = birthday;
        this.school = school;
        this.major = major;
        this.entranceTime = entranceTime;
    }

    @Override
    public String toString() {
        return "Student{" +
                "studNo=" + studNo +
                ", studName='" + studName + '\'' +
                ", sex='" + sex + '\'' +
                ", nation='" + nation + '\'' +
                ", political='" + political + '\'' +
                ", birthday='" + birthday + '\'' +
                ", school='" + school + '\'' +
                ", major='" + major + '\'' +
                ", entranceTime='" + entranceTime + '\'' +
                '}';
    }

    public Student() {
    }

    public int getStudNo() {
        return studNo;
    }

    public void setStudNo(int studNo) {
        this.studNo = studNo;
    }

    public String getStudName() {
        return studName;
    }

    public void setStudName(String studName) {
        this.studName = studName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getPolitical() {
        return political;
    }

    public void setPolitical(String political) {
        this.political = political;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getEntranceTime() {
        return entranceTime;
    }

    public void setEntranceTime(String entranceTime) {
        this.entranceTime = entranceTime;
    }
}
